# coding:utf-8
"""
动态相关测试用例配置
"""
__author__ = 'jiaoshupeng'
from ..parameters.ia_configure import account_live
from conf_public import u_uid
uid = account_live[2]

#定义模块


#接口定义
g_users='/groups/users/%s'%uid #我的群组
g_filter = '/groups?filter=time&page=1&size=20' #推荐的群
g_nearby = '/groups?filter=location&latitude=39.89982720269097&location=&longitude=116.4705504014757&page=1&size=20&sort=distance' #附近的群
g_me = '/groups/%s/me'%uid #群接口,检测我是否有创建群
g_groups ='/groups' #创建群
g_detail ='/groups/%s?filter=detail' #查看群
g_base = '/groups/%s?filter=base' #查看群
g_admins = '/groups/%s/admins' #管理员列表
g_members = '/groups/%s/members?sort=desc' #查看群列表
g_addmembers = '/groups/%s/members' #邀请新成员
g_description='/groups/%s?http_method_override=PUT' #修改群描述
g_del = '/groups/%s?http_method_override=DELETE' #删除群


#post数据
p_null = {}
p_groups = {
    "longitude":"116.4704942491319",
    "latitude":"39.89985921223958",
    "name":"first",
    "city":"1_156_360100",
    "description":"哈哈哈哈哈救命我是真的好久不见了"
}
p_groups_2 = {
    "longitude":"116.4704942491319",
    "latitude":"39.89985921223958",
    "name":"second",
    "city":"1_156_360100",
    "description":"哈哈哈哈哈救命我是真的好久不见了"
}
p_addmembers = {
    "target_id":"%s"%u_uid
}
p_description = {
    "description":"基督教大口大口的借口今生今世亟待解决哈哈哈"
}
p_description_unlegal = {
    "description":"基督教大口大口的借口今生今世亟待解决哈哈哈419"
}
p_name = {
    "name":"change group"
}
p_name_unlegal = {
    "name": "419"
}
p_name_short = {
    "name": "419"
}
#写case
case_users = [g_users,'群','查看我的群']
case_filter = [g_filter,'群组','推荐的群']
case_nearyby = [g_nearby,'群组','附近的群']
case_me = [g_me,'群组','检查我是否有创建群']
case_groups = [g_groups,'创建群','创建群']
case_groups_2 = [g_groups,'创建第二个群','创建第二个群提示您已超过允许创建群的个数了']
case_detail = [g_detail,'查看群','查看群详情']
case_base = [g_base,'查看群','群基本资料获取']
case_admins =[g_admins,'群管理','查看管理员列表']
case_members = [g_members,'群管理','查看群成员']
case_addmembers = [g_addmembers,'群管理','邀请新成员']
case_descript = [g_description,'群管理','修改群介绍']
case_descript_unlegal = [g_description,'修改群介绍','修改群介绍时输入非法字符,提示不合法']
case_name = [g_description,'群管理','修改群昵称']
case_name_short = [g_description,'群管理','修改群昵称,输入一个字符,提示昵称太短']
case_name_unlegal = [g_description,'修改群昵称','修改群昵称,输入非法昵称,提示群昵称不合法']
case_del = [g_del,'群管理','删除群']


#校验数据
group_code = [
    ['self','',{'code':200}],
]
# 群昵称不合法
group_code_403009022 = [
    ['self','',{'code':403009022}],
]
# 您已超过允许创建群的个数了
group_code_40300902 = [
    ['self','',{'code':40300902}],
]
# 非法群介绍
group_code_4031002 = [
    ['self','',{'code':4031002}],
]
#配置URL参数
url_detail = [
    ['groups_group','data',['groups_gid']]
]